<div class="personas index">
	<h2><?php __('Personas');?></h2>
	<table class="art-article" cellpadding="0" cellspacing="0">
	<tr>
					<th><?php echo $this->Paginator->sort('nombres');?></th>
				<th><?php echo $this->Paginator->sort('apellidos');?></th>
				<th><?php echo $this->Paginator->sort('rif');?></th>
				<th><?php echo $this->Paginator->sort('telefono');?></th>
				<th><?php echo $this->Paginator->sort('correo');?></th>
				<th><?php echo $this->Paginator->sort('fl_ingreso');?></th>
				<th><?php echo $this->Paginator->sort('fl_egreso');?></th>
				<th><?php echo $this->Paginator->sort('sw_tipo');?></th>
			<th class="actions"><?php __('Acciones');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($personas as $persona):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>


		<td><?php echo $persona['Persona']['nombres']; ?>&nbsp;</td>
		<td><?php echo $persona['Persona']['apellidos']; ?>&nbsp;</td>
		<td><?php echo $persona['Persona']['rif']; ?>&nbsp;</td>
		<td><?php echo $persona['Persona']['telefono']; ?>&nbsp;</td>
		<td><?php echo $persona['Persona']['correo']; ?>&nbsp;</td>
		<td><?php echo $persona['Persona']['fl_ingreso']; ?>&nbsp;</td>
		<td><?php echo $persona['Persona']['fl_egreso']; ?>&nbsp;</td>

		<td><?php if ($persona['Persona']['sw_tipo']== 1){
			        echo  "Cont Pers. Natural";
					}

				  if ($persona['Persona']['sw_tipo']== 2){
			         echo  "Cont Pers. Juridica";
					}

				 if ($persona['Persona']['sw_tipo']== 3){
			         echo "Asociado";
					}
				 if ($persona['Persona']['sw_tipo']== 4){
			         echo "Alianza";
					}




		 ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link($this->Html->image('editar.png', array('alt' => 'Editar', 'title' => 'Editar Persona' )), array('action' => 'edit', $persona['Persona']['id'])); ?>
			<?php echo $this->Html->link($this->Html->image('borrar.png', array('alt' => 'Borrar', 'title' => 'Borrar Persona')), array('action' => 'delete', $persona['Persona']['id']), null, sprintf(__('Esta seguro de borrar a %s?', true), $persona['Persona']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Página %page% de %pages%, mostrando %current% Personas de %count% en total, comenzando en %start%, terminando en %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
<div class="actions">
	<h3><?php __('Acciones'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Agregar Persona', true), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('Lista de Usuarios', true), array('controller' => 'usuarios', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Agregar Usuario', true), array('controller' => 'usuarios', 'action' => 'add')); ?> </li>
	</ul>
</div>